import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from "@/views/login/login.vue";



Vue.use(VueRouter)

const routerPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
  return routerPush.call(this, location).catch(error => error)
}

  const routes = [
	  
  // 登录路由
    {
      path: "/",
      name: "login",
      component: Login,
    },
	
// 错误路由
  {
    path: "/404",
    name: "404",
    component: () => import("@/views/error/404.vue"),
    visible: false,
  },
  {
    path: "*",
    redirect: "/404",
    visible: false,
  },
]

const router = new VueRouter({
  routes
})

export default router
